package com.ln.asset.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author qiaoyanru
 * @since 2022-05-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Transformation对象", description="")
public class Transformation implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "t_id", type = IdType.AUTO)
    private Integer tId;

    @ApiModelProperty(value = "单号")
    private String tNo;

    @ApiModelProperty(value = "转移状态(0:转移终止 1:已转移 2:转移中)")
    private Integer tStatus;

    @ApiModelProperty(value = "转移类型(1:所属组织转移 2:部门/门店转移 3:责任人转移)")
    private Integer tType;

    @ApiModelProperty(value = "申请转移时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") //返回时间类型
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") //接收时间类型
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "原所属组织")
    private Integer tOrgBefore;

    @ApiModelProperty(value = "原部门")
    private Integer tDepartBefore;

    @ApiModelProperty(value = "原负责人")
    private String tPersonBefore;

    @ApiModelProperty(value = "现组织")
    private Integer tOrgAfter;

    @ApiModelProperty(value = "现部门")
    private Integer tDepartAfter;

    @ApiModelProperty(value = "现负责人")
    private String tPersonAfter;

    @ApiModelProperty(value = "转移时间")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") //返回时间类型
    @DateTimeFormat(pattern="yyyy-MM-dd") //接收时间类型
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    private LocalDate tTransforTime;

    @ApiModelProperty(value = "附件")
    private String tAccessory;

    @ApiModelProperty(value = "备注")
    private String tRemarks;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer isDeleted;


}
